﻿namespace Repositories.DM;

/// <summary>
/// 登录日志
/// </summary>
[SugarTable("s_loginlog")]
public class LoginLog : Column_Base
{
    /// <summary>
    /// 用户id
    /// </summary>
    [SugarColumn(ColumnName = "userid")]
    public int UserId { get; set; }
    /// <summary>
    /// 账号
    /// </summary>
    [SugarColumn(ColumnName = "account")]
    public string Account { get; set; }
    /// <summary>
    /// 姓名
    /// </summary>
    [SugarColumn(ColumnName = "name")]
    public string Name { get; set; }
    /// <summary>
    /// 角色名称
    /// </summary>
    [SugarColumn(ColumnName = "rolename")]
    public string RoleName { get; set; }
    /// <summary>
    /// 用户ip
    /// </summary>
    [SugarColumn(ColumnName = "ip")]
    public string Ip { get; set; }

    /// <summary>
    /// 持续时间
    /// </summary>
    [SugarColumn(ColumnName = "duration")]
    public int Duration { get; set; }

    /// <summary>
    /// 登录时间
    /// </summary>
    [SugarColumn(ColumnName = "logintime")]
    public DateTime LoginTime { get; set; } = DateTime.Now;

    /// <summary>
    /// token
    /// </summary>
    [SugarColumn(ColumnName = "token")]
    public string? Token { get; set; }
}
